//
//  HMCenterLineLabel.m
//  HMMeituanHD
//
//  Created by apple on 2017/5/20.
//  Copyright © 2017年 itheima. All rights reserved.
//

#import "HMCenterLineLabel.h"

@implementation HMCenterLineLabel


// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // 重写父类方法 设置UILabel默认内容
    [super drawRect:rect];
    //添加中划线
    
    //方式1: NSAttributedString
    
    //方式2: 画线
//    UIBezierPath *path = [UIBezierPath bezierPath];
//    path moveToPoint:<#(CGPoint)#>
//    path addLineToPoint:<#(CGPoint)#>
    
    //方式3: 在尺寸内填充颜色
    UIRectFill(CGRectMake(0, rect.size.height * 0.5, rect.size.width, 1));
}


@end
